package com.woniu.cloud.storeassembly.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.cloud.common.dto.Result;
import com.woniu.cloud.entity.TStore;
import org.redisson.api.GeoEntry;
import org.redisson.api.GeoPosition;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import java.math.BigDecimal;

/**
 * <p>
 * 店铺表 服务类
 * </p>
 *
 * @author Lucas
 * @since 2021-09-22
 */
public interface ITStoreService extends IService<TStore> {



    @CachePut(cacheNames = "cachestoregood:id",key="#storeId")
    TStore updateRedis(Integer storeId);

    @Cacheable(cacheNames = "cachestoregood:id",key="#storeId")
    TStore insertRedis(Integer storeId);

    void insertRedisNear(TStore store);

    void removeRedisNear(GeoPosition geoPosition);

    Result getStoreByStoreId(Integer storeId);

    Result insertStore(TStore store);

    Result updateStore(TStore store);

    Result getStoreList(Integer serviceId,Double storeLongitude, Double storeLatitude,Double radius);

    Result insertStorePay(Integer storeId, BigDecimal payNum);
}
